---
title: PolicyAssociationExtensions
summary: API reference for PolicyAssociationExtensions.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# PolicyAssociationExtensions

These extension methods turn raw `PolicyAssociation` rows and `PolicyAssociationList` collections into caller-friendly queries over the current association model. They support list filtering, parent/child navigation, and manual-versus-derived classification after `PolicyAssociationList.GetPolicyAssociationList` has applied the default source-policy exclusion described in [BR-VP-014](../../business-rules.md#br-vp-014-source-policy-excluded-from-associations-by-default).

## Purpose
- Provide the read-side navigation helpers consumers need after association rows have been materialized from `PolicyAssociations.vb`.
- Centralize common association-list operations such as extracting policy numbers, locating parent rows, and identifying manual relationships so callers do not repeat the same traversal logic.
- Bridge the current associations model back to legacy affiliate-style categorization through `ToAffiliateType`, preserving compatibility with older calling patterns.*

## Context
- Namespace: `SAIF.Business.View.Policy`
- Assembly/package: `SAIF.Business.View.Policy` (embedded)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| AssociationType | `Public Function AssociationType(association As PolicyAssociation) As AssociationTypes` | Returns the association-type identifier carried by a row so downstream logic can branch on the current association model rather than the obsolete affiliate model.* |
| PolicyNumbers | `Public Function PolicyNumbers(associations As IEnumerable(Of PolicyAssociation)) As IEnumerable(Of Integer)` | Projects an association sequence to the related policy numbers for set membership checks, display lists, or downstream filtering. |
| Contains | `Public Function Contains(associations As IEnumerable(Of PolicyAssociation), policyNumber As Integer) As Boolean` | Tests whether the list already contains a row for a specific policy number without requiring the caller to hand-roll the scan. |
| ToAffiliateType | `Public Function ToAffiliateType(association As PolicyAssociation) As AffiliateTypes` | Converts a current-model association row into the obsolete `AffiliateTypes` classification so legacy affiliate consumers can continue to interpret the relationship.* |
| IsParentPolicy | `Public Function IsParentPolicy(association As PolicyAssociation) As Boolean` | Identifies whether a row represents the parent-policy relationship used when authorization falls back through the parent path described in [BR-VP-009](../../business-rules.md#br-vp-009-fallback-to-parent-policy-authorization). |
| ParentPolicy | `Public Function ParentPolicy(associations As IEnumerable(Of PolicyAssociation)) As PolicyAssociation` | Resolves the single parent-policy row from an association list so callers can navigate from a child policy to its governing parent entry. |
| Parents | `Public Function Parents(associations As IEnumerable(Of PolicyAssociation)) As IEnumerable(Of PolicyAssociation)` | Filters a list down to the rows classified as parent relationships, supporting callers that need all parent candidates rather than the first match. |
| IsManual | `Public Function IsManual(association As PolicyAssociation) As Boolean` | Classifies a row as a manual relationship by using the association-category conventions described in [BR-VP-021](../../business-rules.md#br-vp-021-association-category-prefix-classification). |
| ToNonManual | `Public Function ToNonManual(association As PolicyAssociation) As PolicyAssociation` | Converts a manual-category row to its non-manual counterpart so callers can normalize manual relationships before comparison or display.* |

## Behavioral notes
- These helpers operate on the list returned from the current association pipeline in `PolicyAssociations.vb`, not on the obsolete affiliated-policy collection.
- `ParentPolicy` and `Parents` exist to navigate the parent/child association graph that is also used by parent-policy authorization fallback in [BR-VP-009](../../business-rules.md#br-vp-009-fallback-to-parent-policy-authorization).
- Manual classification follows the model-wide category-prefix rules in [BR-VP-021](../../business-rules.md#br-vp-021-association-category-prefix-classification), where manual relationships are distinguished from policy relationships by their prefix.
- Because the source policy is omitted from association results unless explicitly included, `Contains` and `PolicyNumbers` normally evaluate only related policies, not the originating policy, unless the caller opted out of [BR-VP-014](../../business-rules.md#br-vp-014-source-policy-excluded-from-associations-by-default).

## Constraints and usage notes
- Use these helpers with `PolicyAssociationList` results from the current associations model; new work should not rebuild equivalent logic on top of obsolete affiliate APIs.
- `ToAffiliateType` exists for compatibility with older affiliate-based callers and should not be treated as the primary classification strategy for new consumers.*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Policy/PolicyAssociations.vb`
